/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package manager;

import entity.Employee;
import iface.IManagerDisabled;
import java.util.ArrayList;

/**
 *
 * @author Noi
 */
public class DisabledEmployeeManager implements IManagerDisabled<Employee> {
    
    private ArrayList<Employee> alEmployee;
    private Manager manager;
    
    @Override
    public void add(Employee obj) {
        this.alEmployee.add(obj);
    }

    @Override
    public void recovery(int index) {
        Employee employee = (Employee)this.alEmployee.remove(index);
        employee.setStatus(true);
        this.manager.getEmployeeManager().add(employee);
    }

    @Override
    public Employee get(int index) {
        return this.alEmployee.get(index);
    }
    
}
